package team2;

import java.util.ArrayList;
import java.util.List;

/**
 * A class that makes documents based on a path.
 * Users should use makeNewDocument as many times as needed, and then retrieve the list of documents with getDocuments.
 * @author Brett Hlavinka
 */
public class DocumentMaker
{
    private Tokenizer tokenizer;
    private Stemmer stemmer;
    private List<Document> documents;

    /**
     * Default constructor for DocumentMaker.
     */
    public DocumentMaker()
    {
        this.tokenizer = new Tokenizer();
        this.stemmer = new Stemmer();
        this.documents = new ArrayList<Document>();
    }

    /**
     * Method that makes a document based on a path.
     * @param path The path of where the document is stored.
     */
    public void makeNewDocument(String path)
    {
        //TODO: Parse the file to retrieve the title and fullText
        String title = "Stub Title";
        String fullText = "This is a stub document.";

        this.documents.add(new Document(title, fullText));
    }

    /**
     * Method that gives all of the documents that were made on this document maker.
     * @return The list of documents.
     */
    public List<Document> getDocuments()
    {
        return this.documents;
    }
}
